home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / AIncludes / CMAcceleration.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  4.3 KB  |  115 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        CMAcceleration.a
  3. ;
  4. ;    Contains:    ColorSync Acceleration Component API
  5. ;
  6. ;    Version:    Technology:    ColorSync 2.0
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1995-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__CMACCELERATION__') = 'UNDEFINED' THEN
  18. __CMACCELERATION__ SET 1
  19.  
  20.     IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
  21.     include 'Components.a'
  22.     ENDIF
  23.     IF &TYPE('__CMAPPLICATION__') = 'UNDEFINED' THEN
  24.     include 'CMApplication.a'
  25.     ENDIF
  26.  
  27. ;  –––––––––––––––––––––––––––––––––––––– version info 
  28.  
  29. cmAccelerationInterfaceVersion    EQU        1
  30. ;  –––––––––––––––––––––––––––––––––––––– Component Type 
  31.  
  32. cmAccelerationComponentType        EQU        'csac'
  33. ;  –––––––––––––––––––––––––––––––––––––– Required Component function selectors 
  34.  
  35. cmLoadTables                    EQU        0
  36. cmCalculateData                    EQU        1
  37. ;  –––––––––––––––––––––––––––––––––––––– table data for acceleration component 
  38. CMAccelerationTableData    RECORD 0
  39. inputLutEntryCount         ds.l    1                ; offset: $0 (0)        ;  count of entries for input lut for one dimension
  40. inputLutWordSize         ds.l    1                ; offset: $4 (4)        ;  count of bits of each entry ( e.g. 16 for WORD )
  41. inputLut                 ds.l    1                ; offset: $8 (8)        ;  handle to input lut
  42. outputLutEntryCount         ds.l    1                ; offset: $C (12)        ;  count of entries for output lut for one dimension    
  43. outputLutWordSize         ds.l    1                ; offset: $10 (16)        ;  count of bits of each entry ( e.g. 8 for BYTE )
  44. outputLut                 ds.l    1                ; offset: $14 (20)        ;  handle to output lut
  45. colorLutInDim             ds.l    1                ; offset: $18 (24)        ;  input dimension  ( e.g. 3 for LAB ; 4 for CMYK )
  46. colorLutOutDim             ds.l    1                ; offset: $1C (28)        ;  output dimension ( e.g. 3 for LAB ; 4 for CMYK )
  47. colorLutGridPoints         ds.l    1                ; offset: $20 (32)        ;  count of gridpoints for color lut ( for one Dimension )    
  48. colorLutWordSize         ds.l    1                ; offset: $24 (36)        ;  count of bits of each entry ( e.g. 8 for BYTE )
  49. colorLut                 ds.l    1                ; offset: $28 (40)        ;  handle to color lut
  50. inputColorSpace             ds.l    1                ; offset: $2C (44)        ;  packing info for input
  51. outputColorSpace         ds.l    1                ; offset: $30 (48)        ;  packing info for output
  52. userData                 ds.l    1                ; offset: $34 (52)
  53. reserved1                 ds.l    1                ; offset: $38 (56)
  54. reserved2                 ds.l    1                ; offset: $3C (60)
  55. reserved3                 ds.l    1                ; offset: $40 (64)
  56. reserved4                 ds.l    1                ; offset: $44 (68)
  57. reserved5                 ds.l    1                ; offset: $48 (72)
  58. sizeof                     EQU *                    ; size:   $4C (76)
  59.                         ENDR
  60. ; typedef struct CMAccelerationTableData * CMAccelerationTableDataPtr
  61.  
  62. ; typedef CMAccelerationTableDataPtr *    CMAccelerationTableDataHdl
  63.  
  64. ;  –––––––––––––––––––––––––––––––––––––– calc data for acceleration component 
  65. CMAccelerationCalcData    RECORD 0
  66. pixelCount                 ds.l    1                ; offset: $0 (0)        ;  count of input pixels
  67. inputData                 ds.l    1                ; offset: $4 (4)        ;  input array
  68. outputData                 ds.l    1                ; offset: $8 (8)        ;  output array
  69. reserved1                 ds.l    1                ; offset: $C (12)
  70. reserved2                 ds.l    1                ; offset: $10 (16)
  71. sizeof                     EQU *                    ; size:   $14 (20)
  72.                         ENDR
  73. ; typedef struct CMAccelerationCalcData * CMAccelerationCalcDataPtr
  74.  
  75. ; typedef CMAccelerationCalcDataPtr *    CMAccelerationCalcDataHdl
  76.  
  77.  
  78. ;   ———————————————————————————————————————————————————————————————————————————————————————————————— 
  79. ;                  A c c e l e r a t i o n   C o m p o n e n t   I n t e r f a c e s
  80. ;   ———————————————————————————————————————————————————————————————————————————————————————————————— 
  81.  
  82.  
  83. ;
  84. ; pascal CMError CMAccelerationLoadTables(ComponentInstance CMSession, CMAccelerationTableDataPtr tableData)
  85. ;
  86.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  87.         Macro
  88.         _CMAccelerationLoadTables
  89.             move.l              #$00040000,-(sp)
  90.             moveq               #0,D0
  91.             dc.w                $A82A
  92.         EndM
  93.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  94.         IMPORT_CFM_FUNCTION CMAccelerationLoadTables
  95.     ENDIF
  96.  
  97.  
  98. ;
  99. ; pascal CMError CMAccelerationCalculateData(ComponentInstance CMSession, CMAccelerationCalcDataPtr calcData)
  100. ;
  101.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  102.         Macro
  103.         _CMAccelerationCalculateData
  104.             move.l              #$00040001,-(sp)
  105.             moveq               #0,D0
  106.             dc.w                $A82A
  107.         EndM
  108.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  109.         IMPORT_CFM_FUNCTION CMAccelerationCalculateData
  110.     ENDIF
  111.  
  112.  
  113.     ENDIF ; __CMACCELERATION__ 
  114.  
  115.